import axios from "axios";
import {useRoute} from "vue-router";

const api = axios.create({
  baseURL:'http://localhost:8090/api-boss',
  timeout: 5000
});


class OrderService{
  private router = useRoute();

  //条件查询订单


  async selectOrder(apiBossOrder: any){
    try {
      const respone = await api.post(`/order/getAll`,apiBossOrder);
      console.log("---------------",respone);

      return respone.data.data.records;
    }catch(error){
      console.error('查询失败',error);
      throw error;
    }
  }

}

export const orderService = new OrderService();
